﻿using System;
using System.Collections.Generic;

using E.BLL;
using E.Model;
using E.Enum;
using E.Web.UI.Page;

using X.Common;
using X.Pager;
using X.Pager.List;

namespace E.Web.Teacher.exam
{
    public partial class ExamDefaultSet : TeacherBasePage
    {
        public IList<ExamDefaultModel> examList = new List<ExamDefaultModel>();

        public string act;

        protected override void ShowPage()
        {

            ExamBLL bll = new ExamBLL();

            act = XRequest.GetString("act");

            if (ispost || act == "s")
            {
                SearchExamModel searchModel = new SearchExamModel();

                ExamDefaultListModel listModel = new ExamDefaultListModel();

                CheckPageIndexValue(XRequest.GetInt("s", 1) - 1, XRequest.GetInt("g", 0), XRequest.GetInt("z", customerPageSize));

                listModel = bll.GetExamDefaultListByCondition(searchModel, customerPageSize, pageIndex);

                if (listModel.TotalCount > 0)
                {
                    count = listModel.TotalCount;
                    examList = listModel.List;
                    PagerBase pager = new ListPager(count, pageIndex, currentPgGroup, customerPageSize, defaultPagesInGroup);

                    Dictionary<string, string> parms = new Dictionary<string, string>();
                    parms.Add("act", act);
                    //parms.Add("CertificateSlt", certificateid.ToString());
                    //parms.Add("RelationSlt", relationid.ToString());
                    //parms.Add("AreaSlt", areaid.ToString());
                    mypager = pager.DrawPager("selfpager", parms);
                }
            }
        }

    }
}